package com.yang.SpringTest.annotation.configurationLearn;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * <p>configurationLearn 测试类</p>
 *
 * @author By: chengxuyuanshitang
 * Package com.yang.SpringTest.annotation.configurationLearn
 * Ceate Time 2024-03-16 15:43
 */
@Slf4j
public class ConfDemoTest {
    public static void main(String[] args) {
//        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ConfDemoConfig.class);
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.yang.SpringTest.annotation.configurationLearn");
        ConfDemoConfig config = context.getBean(ConfDemoConfig.class);
        ConfDemo demo1 = config.confDemo();
        ConfDemo demo2 = config.confDemo();
        log.info("person1 是否等于person2 ？ 结果是： {}", (demo1 == demo2));
    }
}
